package com.oocl.zero.task0710.property.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.oocl.zero.task0710.property.filter.CustomerFilter;

public class Customer {
	@Override
	public String toString() {
		return "id=" + id + "\tname=" + name + "\temail=" + email
				+ "\tgender=" + gender + "\tbirthday=" + getBirthdayView() ;
	}
	//8 john john@163.com true			 1999-10-2
	private int id;
	private String name;
	private String email;
	private boolean gender;//t,male false,female
	private long birthday;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public boolean isGender() {
		return gender;
	}
	public void setGender(boolean gender) {
		this.gender = gender;
	}
	public long getBirthday() {
		return birthday;
	}
	public String getBirthdayView() {
		return new SimpleDateFormat(CustomerFilter.DATE_FORMAT).format(new Date(birthday));
	}
	public void setBirthday(long birthday) {
		this.birthday = birthday;
	}
	
}
